<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <meta name="viewport" content="width=device-width,initial-scale=1,maximum-scale=1,user-scalable=no">
    <title>Title</title>
    <link rel="stylesheet" href="css/style.css">
    <script src="js/jquery1.8.3.min.js"></script>
</head>
<body>
    <div class="top">
        <a>
            <img src="img/left.png">
        </a>
        <div class="title">
            Coventry Student 4 Week
        </div>
    </div>
    <div class="timebox">
        <div class="time">
            17:10:34
        </div>
        <div class="timebg breathe-btn">
            <div class="timebgitem" style="background: rgb(225,78,157)">

            </div>
            <div class="timebgitem" style="background: rgb(227,163,84)">

            </div>
            <div class="timebgitem" style="background: rgb(44,203,188)">

            </div>
        </div>
        <div class="timetip">
                Tap to  reveal barcode
        </div>
    </div>
    <Div class="down">
            <img src="img/down.png">
    </Div>
    <Div class="box2">
        <p class="box2p1">
            Coventry Student 4 Week
        </p>
        <p class="box2p2">
           <img src="img/tip.png"> All buses in the coventry area
        </p>
    </Div>
<Div class="box3">
    <div  class="box3tip">
        <a>Coventry</a>
        <a>mTicket</a>
    </div>
    <div class="box3con">
        <div class="box3conL">
            <p>national</p>
            <p>express</p>
        </div>
        <div class="box3conR">
            Coventry
        </div>

    </div>

</Div>
<div class="box4">
    <a>NX Rewards Cashback</a>
</div>
<Div class="box5">
    <a>Actions</a>
    <a>Ticket info</a>

</Div>
<script>
    function getLocalTime(i) {
        //参数i为时区值数字，比如北京为东八区则输进8,纽约为西5区输入-5
        if (typeof i !== 'number') return;
        var d = new Date();
        //得到1970年一月一日到现在的秒数
        var len = d.getTime();
        //本地时间与GMT时间的时间偏移差
        var offset = d.getTimezoneOffset() * 60000;
        //得到现在的格林尼治时间
        var utcTime = len + offset;
        // console.log(utcTime)
 var dete=new Date(utcTime + 3600000 * i);
        // console.log(dete)
        // console.log(dete.toLocaleDateString().replace(/\//g, "-") + " " + dete.toTimeString().substr(0, 8));
        // console.log(dete.toTimeString().substr(0, 8));
        $('.time').html(dete.toTimeString().substr(0, 8))
        //return new Date(utcTime + 3600000 * i);
    }
    getLocalTime(1)
    setInterval(function () {
        getLocalTime(1)
    },1000)

</script>
</body>
</html>